package ${package.ServiceImpl};

import ${package.Entity}.${entity};
import ${package.Mapper}.${table.mapperName};
<#if table.serviceInterface>
    import ${package.Service}.${table.serviceName};
</#if>
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* <p>
    * ${table.comment!} 服务实现类
    * </p>
*
* @author ${author}
* @since ${date}
*/
@Service
<#if kotlin>
    open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>()<#if table.serviceInterface>, ${table.serviceName}</#if> {

    }
<#else>
    public class ${table.serviceImplName} <#if table.serviceInterface> implements ${table.serviceName}</#if> {

    @Autowired
    ${table.mapperName} mapper;


    @Override
    public List<${entity}> selectAll() {
    return mapper.selectAll();
    }

    @Override
    public ${entity} selectOne(${entity} query) {
    return mapper.selectOne(query);
    }

    @Override
    public void insertSelective(${entity} query) {
    mapper.insertSelective(query);
    }

    @Override
    public List<${entity}> select(${entity} query) {
    return mapper.select(query);
    }

    @Override
    public int batchInsertList(List<${entity}> recordList) {
    return mapper.batchInsertList(recordList);
    }

    @Override
    public int insert(${entity} var1) {
    return mapper.insert(var1);
    }

    @Override
    public List<${entity}> selectByExample(Object var1) {
    return mapper.selectByExample(var1);
    }

    @Override
    public ${entity} selectOneByExample(Object var1) {
    return mapper.selectOneByExample(var1);
    }

    @Override
    public int deleteByExample(Object var1) {
    return mapper.deleteByExample(var1);
    }

    @Override
    public int selectCountByExample(Object var1) {
    return mapper.selectCountByExample(var1);
    }

    @Override
    public ${entity} selectByPrimaryKey(Object var1) {
    return mapper.selectByPrimaryKey(var1);
    }

    @Override
    public int updateByPrimaryKey(${entity} var1) {
    return mapper.updateByPrimaryKey(var1);
    }

    @Override
    public int updateByPrimaryKeySelective(${entity} var1) {
    return mapper.updateByPrimaryKeySelective(var1);
    }

    @Override
    public int updateByPrimaryKeySelectiveList(List<${entity}> recordList) {
    return mapper.updateByPrimaryKeySelectiveList(recordList);
    }
    }
</#if>
